<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

<body>

    <div id="app">

        <Ul>
            <Li v-for="s in students">
                {{s.name}}
            </Li>
        </Ul>
        <span v-bind:title="datetime">
        <!-- {{datetime}}-->
         
        </span>
        <div v-if="canSee">
            你能看到我
        </div>
        <p>
            {{message}}
        </p>
        <button v-on:click="reverseMessage">反转</button>
    </div>
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                message: "Hello world!",
                students: [{
                    name: "Node.js"
                }, {
                    name: "Vue.js"
                }, {
                    name: "Asp.net"
                }, ],
                datetime: "当前时间：" + new Date().toLocaleString(),
                canSee: true
            },
            methods: {
                reverseMessage: function() {
                    this.message = this.message.split('').reverse().join('')
                }
            }
        })
    </script>
</body>

</html>